/*
 *  boolmain.cpp
 *  vector
 *
 *  Created by Fredrik Gustafsson on 2010-11-29.
 *  Copyright 2010 KTH. All rights reserved.
 *
 */


#include "boolvector.h"
#include <iostream>
#include <time.h>

time_t start,final;

int main() {
	Vector<bool> a(100000000, true);
	Vector<bool> b(100000000, false);
	
	std::cout << "**ALL TRUE**" << std::endl;
	
	start = clock();
	std::cout << a.weight_oo() << std::endl;
	final = clock()-start;
	std::cout << "OO: " << (double)final / ((double)CLOCKS_PER_SEC) << std::endl;
	
	start = clock();
	std::cout << a.weight_io() << std::endl;
	final = clock()-start;
	std::cout << "IO: " << (double)final / ((double)CLOCKS_PER_SEC) << std::endl;
	
	start = clock();
	std::cout << a.weight_qw() << std::endl;
	final = clock()-start;
	std::cout << "QW: " << (double)final / ((double)CLOCKS_PER_SEC) << std::endl;
	
	start = clock();
	std::cout << a.weight_hw() << std::endl;
	final = clock()-start;
	std::cout << "HW: " << (double)final / ((double)CLOCKS_PER_SEC) << std::endl;
	
	std::cout << std::endl << "**ALL FALSE**" << std::endl;
	
	start = clock();
	std::cout << b.weight_oo() << std::endl;
	final = clock()-start;
	std::cout << "OO: " << (double)final / ((double)CLOCKS_PER_SEC) << std::endl;
	
	start = clock();
	std::cout << b.weight_io() << std::endl;
	final = clock()-start;
	std::cout << "IO: " << (double)final / ((double)CLOCKS_PER_SEC) << std::endl;
	
	start = clock();
	std::cout << b.weight_qw() << std::endl;
	final = clock()-start;
	std::cout << "QW: " << (double)final / ((double)CLOCKS_PER_SEC) << std::endl;
	
	start = clock();
	std::cout << b.weight_hw() << std::endl;
	final = clock()-start;
	std::cout << "HW: " << (double)final / ((double)CLOCKS_PER_SEC) << std::endl;
	
	
}